﻿@model WSCeCommerceWeb.Models.RegisterModel
@using WSCeCommerceWeb.Helpers

@{
    ViewBag.Title = "Register";
}

<hgroup class="title">
    <h1>@ViewBag.Title.</h1>
    <h2>Create a new account.</h2>
</hgroup>

@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
    @Html.ValidationSummary()

    <fieldset>

        <legend>Registration Form</legend>
        <table>
            <tr>
                <td>@Html.LabelFor(m => m.UserName)</td>
                <td>@Html.TextBoxFor(m => m.UserName)</td>
            </tr>
            <tr>
                <td>@Html.LabelFor(m => m.Password)</td>
                <td>@Html.PasswordFor(m => m.Password)</td>
            </tr>
            <tr>
                <td>@Html.LabelFor(m => m.ConfirmPassword)</td>
                <td>@Html.PasswordFor(m => m.ConfirmPassword)</td>

            </tr>
            <tr>
                <td><h1>Address</h1></td>
            </tr>
            <tr>
                <td>@Html.LabelFor(m => m.Address.AddressType)</td>
                <td>@Html.DropDownListFor(m => m.Address.AddressType,ListHelper.GetAddressTypes())</td>
            </tr>
            <tr>
                <td>@Html.LabelFor(m => m.Address.AddressLine1)</td>
                <td>@Html.EditorFor(m => m.Address.AddressLine1)</td>
            </tr>
            <tr>
                <td>@Html.LabelFor(m => m.Address.AddressLine2)</td>
                <td>@Html.EditorFor(m => m.Address.AddressLine2)</td>
            </tr>
            <tr>
                <td>@Html.LabelFor(m => m.Address.City)</td>
                <td>@Html.EditorFor(m => m.Address.City)</td>
            </tr>
            <tr>
                <td>@Html.LabelFor(m => m.Address.Country)</td>
                <td>@Html.DropDownListFor(m => m.Address.Country, ListHelper.GetCountries())</td>
            </tr><tr>
                <td>@Html.LabelFor(m => m.Address.Zip)</td>
                <td>@Html.EditorFor(m => m.Address.Zip)</td>
            </tr>
        </table>
        <input type="submit" value="Register" />
    </fieldset>
}

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
